﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace DeliveryService
{
    public class BLFoodsCategory
    {
        public List<MFoodsCategory> GetAllFoodCategorys()
        {
            using (DeliveryDBDataContext db = new DeliveryDBDataContext())
            {
                var query = db.FoodsCategories.Select(s => new MFoodsCategory
                                            {
                                                FoodsCatgoryId = s.FoodsCategory_Id,
                                                FoodsCatgoryName = s.FoodsCategory_Name
                                            });
                return query.ToList();
            }
        }
    }
}